// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import Router from 'vue-router'
import routes from './common/route.js'
Vue.config.productionTip = false
import MintUi from 'mint-ui';
Vue.use(MintUi);

Vue.use(Router)
console.log('routes',routes)
const router = new Router({ routes:routes });
Vue.mixin({
  methods: {
    toast(msg,icon=''){
      let data={message:msg,position:'bottom',duration:1800};
      if(icon&&icon.length>0){
        data.iconClass=icon
        data.position='middle'
      }
      Mintui.Toast(data)
    }
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
